Only set the fake fd's revents, not the first one. Fixes bug #531056,
authorRichard Hult <richard@imendio.com>
Thu, 8 May 2008 17:23:08 +0000 (17:23 +0000)
committerRichard Hult <rhult@src.gnome.org>
Thu, 8 May 2008 17:23:08 +0000 (17:23 +0000)
2008-05-08  Richard Hult  <richard@imendio.com>

* gdk/quartz/gdkeventloop-quartz.c (poll_func): Only set the fake
fd's revents, not the first one. Fixes bug #531056, spotted by
Yevgen Muntyan.

svn path=/trunk/; revision=20086

ChangeLog
gdk/quartz/gdkeventloop-quartz.c

index d5b1a20d46572348f652c824322c003cc9b9bb16..75b6a00c293371dad269df1958e8319f9eac753b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-05-08  Richard Hult  <richard@imendio.com>
+
+       * gdk/quartz/gdkeventloop-quartz.c (poll_func): Only set the fake
+       fd's revents, not the first one. Fixes bug #531056, spotted by
+       Yevgen Muntyan.
+
 2008-05-07  Tor Lillqvist  <tml@novell.com>
 
        * gtk-zip.sh.in: Add gtk-update-icon-cache.exe and more man pages
index dcc8c9ca914845d251fca463ab3bfdc1b19a323f..9c8b443878dd7f5a7339891f91a2ad5913cc6387 100644 (file)
@@ -295,7 +295,14 @@ poll_func (GPollFD *ufds, guint nfds, gint timeout_)
 
   if (event) 
     {
-      ufds[0].revents = G_IO_IN;
+      for (i = 0; i < nfds; i++)
+        {
+          if (ufds[i].fd == -1)
+            {
+              ufds[i].revents = G_IO_IN;
+              break;
+            }
+        }
 
       current_event = [event retain];